<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基层AI辅助诊断系统 - 我的收藏</title>
    <!-- 引入Element Plus的样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <!-- 引入Vue 3 -->
    <script src="https://unpkg.com/vue@3"></script>
    <!-- 引入Element Plus组件库 -->
    <script src="https://unpkg.com/element-plus"></script>
    <!-- 引入中文语言包 -->
    <script src="https://unpkg.com/element-plus/dist/locale/zh-cn.min.js"></script>
    <style>
        /* 基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
            background: #FFFFFF;
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
        }

        /* 色彩系统 - 基于HIS系统现代极简风设计规范 */
        :root {
            /* 主色调 */
            --primary: #0F6CBD;
            --primary-light: #D0E7FF;
            --primary-dark: #0A4F8D;
            
            /* 辅助色 */
            --success: #0F8A5F;
            --warning: #F59337;
            --error: #D13438;
            --info: #0078D4;
            
            /* 中性色 - 文字 */
            --text-primary: #1A1A1A;
            --text-secondary: #4D4D4D;
            --text-tertiary: #767676;
            --text-disabled: #A6A6A6;
            
            /* 中性色 - 边框与分割线 */
            --border-strong: #CCCCCC;
            --border-normal: #E0E0E0;
            --border-light: #F0F0F0;
            --divider: #F5F5F5;
            
            /* 中性色 - 背景 */
            --bg-primary: #FFFFFF;
            --bg-secondary: #F9F9F9;
            --bg-card: #FFFFFF;
            --bg-disabled: #F5F5F5;
            
            /* 医疗专业色 */
            --medical-critical: #B91C1C;
            --medical-abnormal: #F59E0B;
            --medical-normal: #10B981;
            --medical-pending: #3B82F6;
            --medical-completed: #9CA3AF;
            
            /* 间距系统 */
            --spacing-2: 2px;
            --spacing-4: 4px;
            --spacing-8: 8px;
            --spacing-12: 12px;
            --spacing-16: 16px;
            --spacing-24: 24px;
            --spacing-32: 32px;
            --spacing-40: 40px;
            --spacing-48: 48px;
            
            /* 字体大小 */
            --font-page-title: 20px;
            --font-card-title: 16px;
            --font-table-title: 14px;
            --font-body: 14px;
            --font-table: 13px;
            --font-small: 12px;
            
            /* 行高 */
            --line-height-title: 1.4;
            --line-height-body: 1.5;
            --line-height-table: 1.2;
            --line-height-form: 1.4;
            
            /* 圆角 */
            --radius-small: 2px;
            --radius-medium: 4px;
            
            /* 动画时间 */
            --transition-fast: 150ms;
            --transition-normal: 200ms;
            --transition-slow: 300ms;
            
            /* 导航统一宽度 */
            --nav-item-width: 140px;
        }

        [v-cloak] {
            display: none;
        }

        /* 布局容器 */
        .container {
            width: 100%;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            background-color: var(--bg-secondary);
        }

        /* 顶部导航栏 */
        .header {
            height: 60px;
            background-color: var(--bg-primary);
            border-bottom: 1px solid var(--border-normal);
            display: flex;
            align-items: center;
            padding: 0 var(--spacing-24);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            position: relative;
            z-index: 100;
        }

        .header-spacer {
            width: 200px;
            flex-shrink: 0;
        }

        #app-nav {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            width: calc(100% - 400px); /* 两侧各200px 对称留白 */
            display: flex;
            justify-content: center;
        }
        
        /* Element Plus菜单样式覆盖 */
        .el-menu {
            border: none !important;
            background-color: transparent !important;
        }
        
        .el-menu--horizontal > .el-menu-item,
        .el-menu--horizontal > .el-sub-menu .el-sub-menu__title {
            height: 60px;
            line-height: 60px;
            color: var(--text-secondary);
            font-weight: 500;
            font-size: var(--font-body);
            padding: 0;
            width: var(--nav-item-width);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .el-sub-menu__icon-arrow { display: none !important; }

        .el-menu--horizontal > .el-sub-menu .el-sub-menu__title::after {
            content: '';
            display: inline-block;
            width: 16px;
            height: 16px;
            margin-left: 8px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: 16px 16px;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        }

        .el-sub-menu:hover > .el-sub-menu__title::after,
        .el-sub-menu.is-active > .el-sub-menu__title::after {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F6CBD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        }

        .el-sub-menu.is-opened > .el-sub-menu__title::after {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F6CBD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 15 12 9 18 15'/></svg>");
        }
        
        .el-menu--horizontal > .el-menu-item.is-active,
        .el-menu--horizontal > .el-sub-menu.is-active .el-sub-menu__title {
            color: var(--primary) !important;
            border-bottom: 2px solid var(--primary);
            font-weight: 500;
        }
        
        .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
        .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
        .el-menu--horizontal > .el-sub-menu:not(.is-disabled):hover .el-sub-menu__title {
            color: var(--primary);
            background-color: transparent;
        }
        
        /* 下拉菜单样式覆盖 */
        .el-menu--popup {
            width: var(--nav-item-width) !important;
            min-width: var(--nav-item-width) !important;
            max-width: var(--nav-item-width) !important;
            border-radius: var(--radius-small);
            padding: 4px 0;
            border: 1px solid var(--border-light);
            border-top: 2px solid var(--primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            text-align: center !important;
        }
        
        .el-menu--popup .el-menu-item {
            height: 36px;
            line-height: 36px;
            padding: 0 !important;
            color: var(--text-secondary);
            white-space: nowrap;
            text-align: center;
            width: var(--nav-item-width) !important;
            box-sizing: border-box;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            font-size: var(--font-body);
        }
        
        .el-menu--popup .el-menu-item:hover {
            background-color: var(--bg-secondary);
            color: var(--primary);
        }

        .user-section {
            display: flex;
            align-items: center;
            gap: var(--spacing-16);
            margin-left: auto;
            z-index: 10;
            width: 200px;
            justify-content: flex-end;
            flex-shrink: 0;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: var(--radius-small);
            transition: background-color var(--transition-fast);
            color: var(--text-secondary);
        }

        .user-section:hover {
            background-color: var(--bg-secondary);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--primary-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            font-weight: 500;
        }

        .user-name {
            font-weight: 500;
            font-size: var(--font-body);
            color: var(--text-secondary);
        }

        .user-arrow {
            color: var(--text-tertiary);
            transition: color var(--transition-normal);
        }

        .user-section:hover .user-arrow {
            color: var(--primary);
        }

        /* 用户下拉弹窗 */
        .user-dropdown {
            position: absolute;
            top: 60px; /* 紧贴头部底部 */
            right: var(--spacing-24);
            width: 160px;
            background: var(--bg-primary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-small);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            display: none;
            z-index: 200;
            overflow: hidden;
        }

        .user-dropdown .item {
            padding: 10px 12px;
            color: var(--text-secondary);
            font-size: var(--font-body);
            cursor: pointer;
            white-space: nowrap;
        }

        .user-dropdown .item:hover {
            background-color: var(--bg-secondary);
            color: var(--primary);
        }

        /* 主要内容区域样式 */
        .main-content {
            padding: 0;
            flex: 1;
            background-color: var(--bg-primary);
            width: 100%;
        }
        
        .content-card {
            width: 100%;
            margin: 0;
            background: var(--bg-primary);
            border: none;
            border-radius: 0;
            box-shadow: none;
            display: flex;
            flex-direction: column;
        }

        /* 面包屑导航样式 */
        .breadcrumb {
            padding: var(--spacing-16) var(--spacing-24);
            display: flex;
            align-items: center;
            border-bottom: 1px solid var(--border-light);
        }
        
        .breadcrumb-item {
            color: var(--text-tertiary);
            font-size: var(--font-body);
            display: flex;
            align-items: center;
        }
        
        .breadcrumb-link {
            color: var(--primary);
            text-decoration: none;
            cursor: pointer;
            transition: color var(--transition-normal);
        }
        
        .breadcrumb-link:hover {
            text-decoration: underline;
        }
        
        .breadcrumb-separator {
            margin: 0 var(--spacing-8);
            color: var(--text-tertiary);
        }

        /* 页面标题与操作区域样式 */
        .combined-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--spacing-24);
            border-bottom: 1px solid var(--border-light);
            background-color: var(--bg-primary);
        }
        
        .page-title {
            font-size: var(--font-page-title);
            font-weight: 600;
            color: var(--text-primary);
            line-height: var(--line-height-title);
            margin-right: var(--spacing-24);
            white-space: nowrap;
        }
        
        .header-actions {
            display: flex;
            align-items: center;
            gap: var(--spacing-16);
        }

        /* 搜索框样式 */
        .search-box {
            position: relative;
            width: 240px;
            height: 32px;
        }
        
        .search-icon {
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary);
            pointer-events: none;
        }
        
        .search-box input {
            width: 100%;
            height: 100%;
            padding: var(--spacing-8) var(--spacing-8) var(--spacing-8) 32px;
            border: 1px solid var(--border-normal);
            border-radius: var(--radius-small);
            font-size: var(--font-body);
            color: var(--text-primary);
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .search-box input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 2px rgba(15, 108, 189, 0.2);
        }
        
        .search-box input::placeholder {
            color: var(--text-tertiary);
        }

        /* 下拉选择器样式 */
        .filter-select {
            height: 32px;
            border: 1px solid var(--border-normal);
            border-radius: var(--radius-small);
            padding: 0 var(--spacing-8);
            font-size: var(--font-body);
            color: var(--text-secondary);
            background-color: var(--bg-primary);
            cursor: pointer;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .filter-select:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 2px rgba(15, 108, 189, 0.2);
        }

        /* 文章列表样式 */
        .article-list {
            padding: var(--spacing-24);
            display: flex;
            flex-direction: column;
            gap: var(--spacing-16);
        }
        
        .article-card {
            border: 1px solid var(--border-light);
            border-radius: var(--radius-small);
            padding: var(--spacing-16);
            transition: all var(--transition-normal);
            cursor: pointer;
            position: relative;
            padding-right: 80px; /* 为右侧按钮留出空间 */
        }
        
        .article-card:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            border-color: var(--border-normal);
        }
        
        .article-title {
            font-size: var(--font-card-title);
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: var(--spacing-8);
            line-height: var(--line-height-title);
        }
        
        .article-meta {
            display: flex;
            gap: var(--spacing-16);
            margin-bottom: var(--spacing-8);
            font-size: var(--font-small);
            color: var(--text-tertiary);
            flex-wrap: wrap;
        }
        
        .article-summary {
            font-size: var(--font-body);
            color: var(--text-secondary);
            line-height: var(--line-height-body);
            margin-bottom: var(--spacing-8);
        }
        
        .article-actions {
            display: flex;
            justify-content: flex-end;
        }
        
        .uncollect-btn {
            background: none;
            border: none;
            color: var(--text-tertiary);
            font-size: var(--font-small);
            cursor: pointer;
            padding: var(--spacing-4) var(--spacing-8);
            border-radius: var(--radius-small);
            display: flex;
            align-items: center;
            gap: var(--spacing-4);
            transition: all var(--transition-normal);
            /* 定位到右侧垂直居中 */
            position: absolute;
            right: var(--spacing-16);
            top: 50%;
            transform: translateY(-50%);
        }
        
        .uncollect-btn:hover {
            color: var(--error);
            background-color: rgba(209, 52, 56, 0.05);
        }
        
        .uncollect-btn .icon {
            width: 16px;
            height: 16px;
        }

        /* 表格底部区域 */
        .table-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--spacing-16) var(--spacing-24);
            border-top: 1px solid var(--border-light);
        }

        /* 分页控件样式 */
        .pagination-text {
            color: var(--text-tertiary);
            font-size: var(--font-small);
        }

        .pagination-controls {
            display: flex;
            align-items: center;
            gap: var(--spacing-24);
        }

        .page-numbers {
            display: flex;
            gap: var(--spacing-8);
        }

        .page-numbers button {
            min-width: 32px;
            height: 32px;
            border-radius: var(--radius-small);
            border: 1px solid var(--border-normal);
            background: var(--bg-primary);
            cursor: pointer;
            color: var(--text-secondary);
            transition: all var(--transition-normal);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: var(--font-small);
        }

        .page-numbers button:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .page-numbers button.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #FFFFFF;
        }

        .pagination-size {
            display: flex;
            align-items: center;
            gap: var(--spacing-8);
            color: var(--text-secondary);
            font-size: var(--font-small);
        }

        .page-size-selector {
            height: 32px;
            border: 1px solid var(--border-normal);
            border-radius: var(--radius-small);
            padding: 0 var(--spacing-8);
            font-size: var(--font-small);
            margin: 0 var(--spacing-4);
        }
    </style>
</head>
<body>
    <div id="app" class="container">
        <!-- 顶部导航栏 - 使用Element Plus组件 -->
        <header class="header">
            <div class="header-spacer"></div>
            <div id="app-nav">
                <el-menu 
                    :default-active="activeIndex" 
                    class="el-menu-demo" 
                    mode="horizontal" 
                    @select="handleSelect"
                    :ellipsis="false"
                    :popper-offset="0"
                    popper-class="custom-dropdown">
                    <el-menu-item index="1">开始问诊</el-menu-item>
                    <el-sub-menu index="2" popper-class="custom-dropdown">
                        <template #title>病历管理</template>
                        <el-menu-item index="2-1">病历查询</el-menu-item>
                        <el-menu-item index="2-2">病历模板</el-menu-item>
                        <el-menu-item index="2-3">个人药品</el-menu-item>
                    </el-sub-menu>
                    <el-menu-item index="3">患者管理</el-menu-item>
                    <el-sub-menu index="4" popper-class="custom-dropdown">
                        <template #title>数据统计</template>
                        <el-menu-item index="4-1">诊断统计</el-menu-item>
                        <el-menu-item index="4-2">宏观统计</el-menu-item>
                    </el-sub-menu>
                    <el-menu-item index="5">医学知识</el-menu-item>
                    <el-sub-menu index="6" popper-class="custom-dropdown">
                        <template #title>基础数据</template>
                        <el-menu-item index="6-1">药品管理</el-menu-item>
                    </el-sub-menu>
                    <el-sub-menu index="7" popper-class="custom-dropdown">
                        <template #title>消息通知</template>
                        <el-menu-item index="7-1">通知查看</el-menu-item>
                        <el-menu-item index="7-2">通知发布</el-menu-item>
                    </el-sub-menu>
                    <el-sub-menu index="8" popper-class="custom-dropdown">
                        <template #title>用户管理</template>
                        <el-menu-item index="8-1">用户管理</el-menu-item>
                        <el-menu-item index="8-2">角色管理</el-menu-item>
                    </el-sub-menu>
                </el-menu>
            </div>
            <div class="user-section" id="userSection">
                <span class="user-name">张医生</span>
                <svg class="user-arrow" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <polyline points="6 9 12 15 18 9"></polyline>
                </svg>
            </div>
            <div class="user-dropdown" id="userDropdown">
                <div class="item">个人中心</div>
                <div class="item">退出登录</div>
            </div>
        </header>
        <div class="main-content">
            <div class="content-card">
                <!-- 面包屑导航 -->
                <div class="breadcrumb">
                    <div class="breadcrumb-item">
                        <a class="breadcrumb-link" href="09-知识库首页.html">知识库首页</a>
                        <span class="breadcrumb-separator">></span>
                    </div>
                    <div class="breadcrumb-item">我的收藏</div>
                </div>
                
                <!-- 页面标题与操作区域 -->
                <section class="combined-header">
                    <h1 class="page-title">我的收藏</h1>
                    <div class="header-actions">
                        <div class="search-box">
                            <svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <circle cx="11" cy="11" r="8"></circle>
                                <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
                            </svg>
                            <input type="text" id="searchInput" placeholder="请输入文章标题摘要等关键字...">
                        </div>
                        <select class="filter-select" id="categoryFilter">
                            <option value="all">所有分类</option>
                            <option value="clinical">临床指南</option>
                            <option value="medication">药物说明书</option>
                            <option value="treatment">诊疗规范</option>
                            <option value="education">健康教育资料</option>
                        </select>
                        <select class="filter-select" id="timeFilter">
                            <option value="newest">收藏时间 ↓</option>
                            <option value="oldest">收藏时间 ↑</option>
                        </select>
                    </div>
                </section>
                
                <!-- 收藏文章列表 -->
                <div class="article-list" id="articleList">
                    <!-- 文章卡片1 -->
                    <div class="article-card">
                        <h3 class="article-title">《2025年高血压诊疗指南更新》</h3>
                        <div class="article-meta">
                            <span>收藏时间: 2025-09-28</span>
                            <span>来源: 中国高血压联盟</span>
                            <span>分类: 临床指南</span>
                        </div>
                        <p class="article-summary">摘要: 本指南更新了高血压诊断标准和治疗方案，强调基层医疗机构的管理策略...</p>
                        <button class="uncollect-btn">
                            <svg class="icon" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
                            </svg>
                            取消收藏
                        </button>
                    </div>
                    
                    <!-- 文章卡片2 -->
                    <div class="article-card">
                        <h3 class="article-title">《常见慢性病用药指导手册》</h3>
                        <div class="article-meta">
                            <span>收藏时间: 2025-09-26</span>
                            <span>来源: 国家药品监督管理局</span>
                            <span>分类: 药物说明书</span>
                        </div>
                        <p class="article-summary">摘要: 针对基层医疗机构常见慢性病用药进行详细说明，包括用法用量、注意事项...</p>
                        <button class="uncollect-btn">
                            <svg class="icon" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
                            </svg>
                            取消收藏
                        </button>
                    </div>
                    
                    <!-- 文章卡片3 -->
                    <div class="article-card">
                        <h3 class="article-title">《基层医疗机构糖尿病规范化诊疗流程》</h3>
                        <div class="article-meta">
                            <span>收藏时间: 2025-09-25</span>
                            <span>来源: 国家卫健委</span>
                            <span>分类: 诊疗规范</span>
                        </div>
                        <p class="article-summary">摘要: 针对基层医疗机构制定的糖尿病筛查、诊断、治疗和随访的标准化流程...</p>
                        <button class="uncollect-btn">
                            <svg class="icon" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
                            </svg>
                            取消收藏
                        </button>
                    </div>
                    
                    <!-- 文章卡片4 -->
                    <div class="article-card">
                        <h3 class="article-title">《老年人合理用药指导手册》</h3>
                        <div class="article-meta">
                            <span>收藏时间: 2025-09-20</span>
                            <span>来源: 中国老年医学学会</span>
                            <span>分类: 健康教育资料</span>
                        </div>
                        <p class="article-summary">摘要: 针对老年人群体的用药安全问题，提供详细的用药指导和注意事项...</p>
                        <button class="uncollect-btn">
                            <svg class="icon" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
                            </svg>
                            取消收藏
                        </button>
                    </div>
                    
                    <!-- 文章卡片5 -->
                    <div class="article-card">
                        <h3 class="article-title">《基层常见皮肤病诊疗指南》</h3>
                        <div class="article-meta">
                            <span>收藏时间: 2025-09-15</span>
                            <span>来源: 中国皮肤科医师协会</span>
                            <span>分类: 临床指南</span>
                        </div>
                        <p class="article-summary">摘要: 针对基层医疗机构常见皮肤病的诊断和治疗提供详细指导...</p>
                        <button class="uncollect-btn">
                            <svg class="icon" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                                <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
                            </svg>
                            取消收藏
                        </button>
                    </div>
                </div>
                
                <!-- 分页控件 -->
                <div class="table-footer">
                    <div class="pagination-text">共 <span id="totalArticles">12</span> 条记录</div>
                    <div class="pagination-controls">
                        <div id="pageNumbers" class="page-numbers">
                            <button class="active">1</button>
                            <button>2</button>
                            <button>3</button>
                        </div>
                        <div class="pagination-size">
                            每页显示
                            <select id="pageSizeSelector" class="page-size-selector">
                                <option value="5" selected>5</option>
                                <option value="10">10</option>
                                <option value="20">20</option>
                            </select>
                            条
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script>
        // 创建Vue应用
        document.addEventListener('DOMContentLoaded', function() {
            const { createApp, ref } = Vue;
            
            // 创建导航菜单Vue应用
            const navApp = createApp({
                setup() {
                    const activeIndex = ref('5'); // 默认选中"医学知识"
                    
                    const handleSelect = (key, keyPath) => {
                        console.log(key, keyPath);
                        // 这里可以添加导航逻辑，如页面跳转等
                        if (key === '5') {
                            window.location.href = '09-知识库首页.html';
                        }
                    };
                    
                    return {
                        activeIndex,
                        handleSelect
                    };
                }
            });
            
            // 使用Element Plus
            navApp.use(ElementPlus, {
                locale: ElementPlusLocaleZhCn
            });
            
            // 挂载导航Vue应用
            navApp.mount('#app-nav');
            
            // 用户下拉菜单交互
            const userSection = document.getElementById('userSection');
            const userDropdown = document.getElementById('userDropdown');
            
            if (userSection && userDropdown) {
                userSection.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const isOpen = userDropdown.style.display === 'block';
                    userDropdown.style.display = isOpen ? 'none' : 'block';
                });

                document.addEventListener('click', function() {
                    userDropdown.style.display = 'none';
                });
            }
            
            // 收藏文章数据
            const collectedArticles = [
                {
                    id: 1,
                    title: '《2025年高血压诊疗指南更新》',
                    date: '2025-09-28',
                    source: '中国高血压联盟',
                    category: '临床指南',
                    summary: '本指南更新了高血压诊断标准和治疗方案，强调基层医疗机构的管理策略...'
                },
                {
                    id: 2,
                    title: '《常见慢性病用药指导手册》',
                    date: '2025-09-26',
                    source: '国家药品监督管理局',
                    category: '药物说明书',
                    summary: '针对基层医疗机构常见慢性病用药进行详细说明，包括用法用量、注意事项...'
                },
                {
                    id: 3,
                    title: '《基层医疗机构糖尿病规范化诊疗流程》',
                    date: '2025-09-25',
                    source: '国家卫健委',
                    category: '诊疗规范',
                    summary: '针对基层医疗机构制定的糖尿病筛查、诊断、治疗和随访的标准化流程...'
                },
                {
                    id: 4,
                    title: '《老年人合理用药指导手册》',
                    date: '2025-09-20',
                    source: '中国老年医学学会',
                    category: '健康教育资料',
                    summary: '针对老年人群体的用药安全问题，提供详细的用药指导和注意事项...'
                },
                {
                    id: 5,
                    title: '《基层常见皮肤病诊疗指南》',
                    date: '2025-09-15',
                    source: '中国皮肤科医师协会',
                    category: '临床指南',
                    summary: '针对基层医疗机构常见皮肤病的诊断和治疗提供详细指导...'
                },
                {
                    id: 6,
                    title: '《基层医疗机构常见耳鼻喉疾病诊疗指南》',
                    date: '2025-09-10',
                    source: '中华耳鼻咽喉头颈外科学会',
                    category: '临床指南',
                    summary: '针对中耳炎、鼻炎等基层常见耳鼻喉疾病的诊断和治疗方案...'
                },
                {
                    id: 7,
                    title: '《基层医疗机构常见口腔疾病诊疗指南》',
                    date: '2025-09-05',
                    source: '中华口腔医学会',
                    category: '临床指南',
                    summary: '针对龋齿、牙周炎等基层常见口腔疾病的诊断和治疗方案...'
                }
            ];
            
            // 搜索和筛选
            const searchInput = document.getElementById('searchInput');
            const categoryFilter = document.getElementById('categoryFilter');
            const timeFilter = document.getElementById('timeFilter');
            
            // 搜索功能
            searchInput.addEventListener('input', function() {
                const searchTerm = this.value.toLowerCase();
                alert(`搜索关键词: ${searchTerm}`);
                // 实际应用中应该调用筛选函数
            });
            
            // 分类筛选
            categoryFilter.addEventListener('change', function() {
                const category = this.value;
                alert(`筛选分类: ${category}`);
                // 实际应用中应该调用筛选函数
            });
            
            // 时间排序
            timeFilter.addEventListener('change', function() {
                const timeOrder = this.value;
                alert(`时间排序: ${timeOrder === 'newest' ? '最新优先' : '最早优先'}`);
                // 实际应用中应该调用排序函数
            });
            
            // 取消收藏按钮事件
            document.querySelectorAll('.uncollect-btn').forEach(btn => {
                btn.addEventListener('click', function(e) {
                    e.stopPropagation(); // 阻止事件冒泡
                    
                    // 确认对话框
                    if (confirm('确定要取消收藏这篇文章吗？')) {
                        // 模拟从收藏列表中移除
                        const articleCard = this.closest('.article-card');
                        if (articleCard) {
                            // 改变书签图标颜色为灰色
                            this.querySelector('.icon').style.color = '#A6A6A6';
                            
                            // 淡出效果
                            articleCard.style.opacity = '0.5';
                            setTimeout(() => {
                                articleCard.remove();
                                
                                // 提示消息
                                ElementPlus.ElMessage({
                                    message: '已取消收藏',
                                    type: 'success'
                                });
                            }, 300);
                        }
                    }
                });
            });
            
            // 文章点击事件
            document.querySelectorAll('.article-card').forEach(card => {
                card.addEventListener('click', function(e) {
                    // 如果点击的不是取消收藏按钮，则跳转到文章详情页
                    if (!e.target.closest('.uncollect-btn')) {
                        // 模拟跳转到文章详情页
                        const title = this.querySelector('.article-title').textContent;
                        alert(`查看文章详情：${title}`);
                        // 实际应用中可以使用：window.location.href = '10-文章详情页..html?id=xxx';
                    }
                });
            });
            
            // 分页控件事件
            document.querySelectorAll('#pageNumbers button').forEach(btn => {
                btn.addEventListener('click', function() {
                    // 移除当前激活状态
                    document.querySelectorAll('#pageNumbers button').forEach(b => b.classList.remove('active'));
                    // 设置当前页为激活状态
                    this.classList.add('active');
                    
                    const page = this.textContent;
                    alert(`切换到第 ${page} 页`);
                    // 实际应用中应该调用分页函数
                });
            });
            
            // 每页显示数量选择
            document.getElementById('pageSizeSelector').addEventListener('change', function() {
                const pageSize = this.value;
                alert(`每页显示 ${pageSize} 条记录`);
                // 实际应用中应该调用分页函数
            });
        });
    </script>
</body>
</html>
